-
Notifications
You must be signed in to change notification settings - Fork 1.6k
KEP-5607: Allow hostNetwork pods to use user namespaces #5608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
HirazawaUi
commented
Oct 3, 2025
- One-line PR description: Allow hostNetwork pods to use user namespaces
- Issue link: Allow HostNetwork Pods to Use User Namespaces #5607
- Other comments:
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: HirazawaUi The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
When the `UserNamespacesHostNetworkSupport` feature gate is enabled, we will relax this validation check. | ||
The kube-apiserver will accept such a Pod spec and pass it on to the kubelet. | ||
At this point, the responsibility for successfully creating and running the Pod shifts to the container runtime. | ||
If the low-level container runtime (e.g., containerd/runc) does not support this combination, the pod will remain stuck in the `ContainerCreating` state and report an exception event, which is the expected behavior. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we go with this proposal, we should include making it work with containers/crio/runc.
### User Stories (Optional) | ||
|
||
#### Story 1 | ||
As a cluster administrator, I want to enable user namespaces for my control plane static Pods (e.g., kube-apiserver, kube-controller-manager) to follow the principle of least privilege and reduce the attack surface. These Pods need to use hostNetwork to interact correctly with the cluster network. By enabling the new feature gate, I can add a critical layer of security isolation to these vital components without changing their networking model. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.